Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] canary from vercel:canary #4

Merged
merged 5 commits into from
Jan 8, 2025
Merged

[pull] canary from vercel:canary #4

merged 5 commits into from
Jan 8, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 8, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

Manoj-M-S and others added 5 commits January 7, 2025 20:26
… utlize the App router (#74180)

This PR updates the with-styled-components-rtl example to use the App
Router. Here are the changes that have been made:

- Renamed the `pages` folder to the `app` folder.
- Converted the `index.tsx` to `page.tsx` file as part of the App
Router.
- Created `layout.tsx` in app directory, merging functionality from both
` _app.tsx` and `_document.tsx`:
  -  `ThemeProvider` setup from `_app.tsx`
  -   `RTL` and `styled-components` setup from `_document.tsx`
- Created `lib/registry.tsx` for styled-components server-side rendering
and moved styled-components server-side rendering logic from
`_document.tsx`
- Updated the package.json file.

The following actions were performed as part of this PR:

- Ran `pnpm prettier-check` with no issues found.
- Executed the `pnpm check-examples` script.

CC: @samcx

---------

Co-authored-by: samcx <[email protected]>
Previously, we had code responsible for parsing and handling the
`x-now-route-matches` header (sent by Vercel) that included the route
matches used for parameter parsing that only read from the named
parameters _if they were all present_. This doesn't apply to routes with
optional parameters (such as `[[...rest]]`), so it wasn't utilizing that
matching mechanism. It previously fell back onto the second stage of
parsing that utilized numeric based group matching, but this was
recently changed on Vercel, so the fallback no longer applies for
Next.js applications that are running on 15+.
- Decoupled pages router specific logic from the dev build indicator to
extract a generic version
- Created a pages router specific initialize function for dev build
indicator to be called on pages router hydration
- This prepares for upcoming work on the dev build indicator for App
router
- Covered by [e2e
test](https://github.com/vercel/next.js/blob/jude/refactor-dev-build-indicator/test/integration/build-indicator/test/index.test.js)
@pull pull bot added the ⤵️ pull label Jan 8, 2025
@pull pull bot merged commit 58cd123 into code:canary Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants